<!DOCTYPE html>
<html lang="en">
<head>
<title>cef4delphi: uCEFTypes: Record TCefFrameHandler</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="generator" content="PasDoc 0.16.0-snapshot">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="StyleSheet" type="text/css" href="pasdoc.css">
</head>
<body>
<span id="TCefFrameHandler"></span><h1 class="cio">Record TCefFrameHandler</h1>
<div class="sections">
<div class="one_section"><a class="section" href="#PasDoc-Description">Description</a></div><div class="one_section">Hierarchy</div><div class="one_section"><a class="section" href="#PasDoc-Fields">Fields</a></div><div class="one_section">Methods</div><div class="one_section">Properties</div></div>
<span id="PasDoc-Description"></span><h2 class="unit">Unit</h2>
<p class="unitlink">
<a href="uCEFTypes.html">uCEFTypes</a></p>
<h2 class="declaration">Declaration</h2>
<p class="declaration">
<code>type TCefFrameHandler = record</code></p>
<h2 class="description">Description</h2>
<p>
 Implement this STRUCTURE to handle events related to ICefFrame life span. The order of callbacks is:

<p>(1) During initial ICefBrowserHost creation and navigation of the main frame: - ICefFrameHandler.OnFrameCreated =&gt; The initial main frame object has been created. Any commands will be queued until the frame is attached. - ICefFrameHandler.OnMainFrameChanged =&gt; The initial main frame object has been assigned to the browser. - ICefLifeSpanHandler.OnAfterCreated =&gt; The browser is now valid and can be used. - ICefFrameHandler.OnFrameAttached =&gt; The initial main frame object is now connected to its peer in the renderer process. Commands can be routed.

<p>(2) During further ICefBrowserHost navigation/loading of the main frame and/or sub-frames: - ICefFrameHandler.OnFrameCreated =&gt; A new main frame or sub-frame object has been created. Any commands will be queued until the frame is attached. - ICefFrameHandler.OnFrameAttached =&gt; A new main frame or sub-frame object is now connected to its peer in the renderer process. Commands can be routed. - ICefFrameHandler.OnFrameDetached =&gt; An existing main frame or sub- frame object has lost its connection to the renderer process. If multiple objects are detached at the same time then notifications will be sent for any sub-frame objects before the main frame object. Commands can no longer be routed and will be discarded. - ICefFrameHandler.OnMainFrameChanged =&gt; A new main frame object has been assigned to the browser. This will only occur with cross-origin navigation or re-navigation after renderer process termination (due to crashes, etc).

<p>(3) During final ICefBrowserHost destruction of the main frame: - ICefFrameHandler.OnFrameDetached =&gt; Any sub-frame objects have lost their connection to the renderer process. Commands can no longer be routed and will be discarded. - ICefLifeSpanHandler.OnBeforeClose =&gt; The browser has been destroyed. - ICefFrameHandler.OnFrameDetached =&gt; The main frame object have lost its connection to the renderer process. Notifications will be sent for any sub-frame objects before the main frame object. Commands can no longer be routed and will be discarded. - ICefFrameHandler.OnMainFrameChanged =&gt; The final main frame object has been removed from the browser.

<p>Cross-origin navigation and/or loading receives special handling.

<p>When the main frame navigates to a different origin the OnMainFrameChanged callback (2) will be executed with the old and new main frame objects.

<p>When a new sub-frame is loaded in, or an existing sub-frame is navigated to, a different origin from the parent frame, a temporary sub-frame object will first be created in the parent's renderer process. That temporary sub-frame will then be discarded after the real cross-origin sub-frame is created in the new/target renderer process. The client will receive cross-origin navigation callbacks (2) for the transition from the temporary sub-frame to the real sub-frame. The temporary sub-frame will not recieve or execute commands during this transitional period (any sent commands will be discarded).

<p>When a new popup browser is created in a different origin from the parent browser, a temporary main frame object for the popup will first be created in the parent's renderer process. That temporary main frame will then be discarded after the real cross-origin main frame is created in the new/target renderer process. The client will recieve creation and initial navigation callbacks (1) for the temporary main frame, followed by cross- origin navigation callbacks (2) for the transition from the temporary main frame to the real main frame. The temporary main frame may receive and execute commands during this transitional period (any sent commands may be executed, but the behavior is potentially undesirable since they execute in the parent browser's renderer process and not the new/target renderer process).

<p>Callbacks will not be executed for placeholders that may be created during pre-commit navigation for sub-frames that do not yet exist in the renderer process. Placeholders will have ICefFrame.GetIdentifier() == -4.

<p>The functions of this interface will be called on the UI thread unless otherwise indicated.

<p>NOTE: This struct is allocated client-side. </p>
<p>


<p>Implemented by ICefFrameHandler.

<p>&lt;see href=&quot;<a href="https://bitbucket.org/chromiumembedded/cef/src/master/include/capi/cef_frame_handler_capi.h">https://bitbucket.org/chromiumembedded/cef/src/master/include/capi/cef_frame_handler_capi.h</a>&quot;&gt;CEF source file: /include/capi/cef_frame_handler_capi.h (cef_frame_handler_t))</p>
<h2 class="overview">Overview</h2>
<span id="PasDoc-Fields"></span><h3 class="summary">Fields</h3>
<table class="summary wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code><strong><a href="uCEFTypes.TCefFrameHandler.html#base">base</a></strong>: <a href="uCEFTypes.TCefBaseRefCounted.html">TCefBaseRefCounted</a>;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code><strong><a href="uCEFTypes.TCefFrameHandler.html#on_frame_created">on_frame_created</a></strong>: procedure(self: <a href="uCEFTypes.html#PCefFrameHandler">PCefFrameHandler</a>; browser: <a href="uCEFTypes.html#PCefBrowser">PCefBrowser</a>; frame: <a href="uCEFTypes.html#PCefFrame">PCefFrame</a>); stdcall;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code><strong><a href="uCEFTypes.TCefFrameHandler.html#on_frame_destroyed">on_frame_destroyed</a></strong>: procedure(self: <a href="uCEFTypes.html#PCefFrameHandler">PCefFrameHandler</a>; browser: <a href="uCEFTypes.html#PCefBrowser">PCefBrowser</a>; frame: <a href="uCEFTypes.html#PCefFrame">PCefFrame</a>); stdcall;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code><strong><a href="uCEFTypes.TCefFrameHandler.html#on_frame_attached">on_frame_attached</a></strong>: procedure(self: <a href="uCEFTypes.html#PCefFrameHandler">PCefFrameHandler</a>; browser: <a href="uCEFTypes.html#PCefBrowser">PCefBrowser</a>; frame: <a href="uCEFTypes.html#PCefFrame">PCefFrame</a>; reattached: integer); stdcall;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code><strong><a href="uCEFTypes.TCefFrameHandler.html#on_frame_detached">on_frame_detached</a></strong>: procedure(self: <a href="uCEFTypes.html#PCefFrameHandler">PCefFrameHandler</a>; browser: <a href="uCEFTypes.html#PCefBrowser">PCefBrowser</a>; frame: <a href="uCEFTypes.html#PCefFrame">PCefFrame</a>); stdcall;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code><strong><a href="uCEFTypes.TCefFrameHandler.html#on_main_frame_changed">on_main_frame_changed</a></strong>: procedure(self: <a href="uCEFTypes.html#PCefFrameHandler">PCefFrameHandler</a>; browser: <a href="uCEFTypes.html#PCefBrowser">PCefBrowser</a>; old_frame, new_frame: <a href="uCEFTypes.html#PCefFrame">PCefFrame</a>); stdcall;</code></td>
</tr>
</table>
<h2 class="description">Description</h2>
<h3 class="detail">Fields</h3>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="base"></span><code><strong>base</strong>: <a href="uCEFTypes.TCefBaseRefCounted.html">TCefBaseRefCounted</a>;</code></td>
</tr>
<tr><td colspan="2">
<p class="nodescription">This item has no description.</p></td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="on_frame_created"></span><code><strong>on_frame_created</strong>: procedure(self: <a href="uCEFTypes.html#PCefFrameHandler">PCefFrameHandler</a>; browser: <a href="uCEFTypes.html#PCefBrowser">PCefBrowser</a>; frame: <a href="uCEFTypes.html#PCefFrame">PCefFrame</a>); stdcall;</code></td>
</tr>
<tr><td colspan="2">
<p class="nodescription">This item has no description.</p></td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="on_frame_destroyed"></span><code><strong>on_frame_destroyed</strong>: procedure(self: <a href="uCEFTypes.html#PCefFrameHandler">PCefFrameHandler</a>; browser: <a href="uCEFTypes.html#PCefBrowser">PCefBrowser</a>; frame: <a href="uCEFTypes.html#PCefFrame">PCefFrame</a>); stdcall;</code></td>
</tr>
<tr><td colspan="2">
<p class="nodescription">This item has no description.</p></td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="on_frame_attached"></span><code><strong>on_frame_attached</strong>: procedure(self: <a href="uCEFTypes.html#PCefFrameHandler">PCefFrameHandler</a>; browser: <a href="uCEFTypes.html#PCefBrowser">PCefBrowser</a>; frame: <a href="uCEFTypes.html#PCefFrame">PCefFrame</a>; reattached: integer); stdcall;</code></td>
</tr>
<tr><td colspan="2">
<p class="nodescription">This item has no description.</p></td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="on_frame_detached"></span><code><strong>on_frame_detached</strong>: procedure(self: <a href="uCEFTypes.html#PCefFrameHandler">PCefFrameHandler</a>; browser: <a href="uCEFTypes.html#PCefBrowser">PCefBrowser</a>; frame: <a href="uCEFTypes.html#PCefFrame">PCefFrame</a>); stdcall;</code></td>
</tr>
<tr><td colspan="2">
<p class="nodescription">This item has no description.</p></td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="on_main_frame_changed"></span><code><strong>on_main_frame_changed</strong>: procedure(self: <a href="uCEFTypes.html#PCefFrameHandler">PCefFrameHandler</a>; browser: <a href="uCEFTypes.html#PCefBrowser">PCefBrowser</a>; old_frame, new_frame: <a href="uCEFTypes.html#PCefFrame">PCefFrame</a>); stdcall;</code></td>
</tr>
<tr><td colspan="2">
<p class="nodescription">This item has no description.</p></td></tr>
</table>
<hr><span class="appinfo"><em>Generated by <a href="https://pasdoc.github.io/">PasDoc 0.16.0-snapshot</a>. </em>
</span>
</body></html>
